<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{if !isset($catid)}{:getSite('title')}{else}{$SEO['title']}{/if}{if getSite('brand')} -【{:getSite('brand')}】{/if}</title>
    <meta name="keywords" content="{$SEO['keyword']}" />
    <meta name="description" content="{$SEO['description']}" />
    <link href="{:getSite('favicon')}" rel="icon">
    <link rel="stylesheet" href="__STATIC__/libs/layui/css/layui.css">
    <link rel="stylesheet" href="__SKIN__/dzd/cms/css/style.css"/>
    <link rel="stylesheet" href="__STATIC__/libs/awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="__SKIN__/dzd/cms/css/animate.min.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2377328_cb5nlydg0w7.css">
</head>
<body>
<div class="header">
    <div class="layui-container">
        <a class="layui-logo" href="/"><img src="{:getSite('logo')}" alt="{:getSite('title')}"></a>
        <div class="ew-nav-group">
            <div class="nav-toggle"><i class="layui-icon layui-icon-more-vertical"></i></div>
            <ul class="layui-nav" lay-filter="header-nav">
                <li class="layui-nav-item {if !isset($catid)}layui-this{/if}"><a href="{:url('cms/index/index')}" target="_self">{:patch('home')}</a></li>
                {yzn module="cms" action="category" catid="0" siteId="$site_id" cache="3600"   order="listorder ASC" num="10" return="data"}
                {volist name="data" id="vo"}
                <li class="layui-nav-item {if isset($catid) && in_array($catid,explode(',',$vo['arrchildid']))}layui-this{/if}">
                    {if $vo['child']}
                    <a href="javascript:;">{$vo.catname}</a>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        {yzn module="cms" action="category" catid="$vo['id']" siteId="$site_id" cache="3600" order="listorder ASC" num="10" return="data"}
                        {foreach $data as $key=>$vo }
                        <dd><a href="{$vo.url}">{$vo.catname}</a></dd>
                        {/foreach}
                        {/yzn}
                    </dl>
                    {else}
                    <a href="{$vo.url}">{$vo.catname}</a>
                    {/if}
                </li>
                {/volist}
                {/yzn}

                //所有站点列表
                <li class="layui-nav-item">
                    <a href="javascript:;">所有站点</a>
                    <dl class="layui-nav-child">
                        <!-- 域名相同使用于多语言站，点击切换 -->
                        {if $siteArray}
                        {volist name="siteArray" id="vo"}
                        <dd><a href="javascript:void(0);" onclick="setLang('{$vo.mark}')" title="切换到{$vo.name}"><img src= "/static/language/{$vo.mark}.png"> {$vo.name}</a></dd>
                        {/volist}
                        {/if}
                        <!-- 所有站 -->
                        {get table="site"  status="1" return="data"}
                        {volist name="data" id="vo"}
                        <dd> <a {if $site_id==$vo.id}class="active"{/if} href="{if $vo.http==0}http://{else}https://{/if}{$vo.domain}/" title="跳转到{$vo.name}"><img src= "/static/language/{$vo.mark}.png"> {$vo.name}</a></dd>
                        {/volist}
                        {/get}
                    </dl>
                </li>
                <!-- 搜索 -->
                <li class="layui-nav-item">
                    <form name="formsearch" action="{:url('cms/index/search')}" class="layui-search">
                        <input class="layui-input" type="text" name="keyword" value="请输入关键字" onfocus="if(this.value==defaultValue)this.value=''" onblur="if(this.value=='')this.value=defaultValue">
                        <button type="submit" class="search-btn layui-btn"><i class="layui-icon layui-icon-search"></i></button>
                    </form>
                </li>
                <!-- 会员中心 注册登录 -->
                {if $userinfo}
                <li class="layui-nav-item">
                    <a href="{:url('member/index/index')}">会员中心<span class="layui-badge-dot"></span></a>
                </li>
                <li class="layui-nav-item">
                    <a href=""><img src="//t.cn/RCzsdCq" class="layui-nav-img">{$Think.session.user_auth.username}</a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('member/index/index')}">会员：{$Think.session.user_auth.username}</a></dd>
                        <dd><a href="{:url('member/index/logout')}">退出</a></dd>
                    </dl>
                </li>
                {else}
                <li class="layui-nav-item">
                    <a href=""><img src="//t.cn/RCzsdCq" class="layui-nav-img">注册/登录</a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:url('member/index/login')}">登录</a></dd>
                        <dd><a href="{:url('member/index/register')}">注册</a></dd>
                    </dl>
                </li>
                {/if}
            </ul>

        </div>
    </div>
</div>
